# 6.1
import string

from pip._vendor.pyparsing import basestring

seq = 'hello'
print(seq[1])
print(seq[1:3])
print(seq * 3)
print(seq + ' world')
print('h ' in seq)
print('h' not in seq)
# print(seq[5])
print(seq[::-1])
print(seq[::2])

s = 'abcde'
print(s[:None])
for i in [None] + list(range(-1, -len(s), -1)):
    print(s[:i])
aList = list(seq)
aTuple = tuple(seq)
print(aList, aTuple)
for i, j in enumerate(s):
    print(i, j)
print(len(s))
print(max(s), min(s))
for i in reversed(s):
    print(i)
for i in sorted(seq):
    print(i)
print(sum([1, 2, 3]))
for i in zip(seq):
    print(i)

# 6.2
print(basestring('212'))
aString = 'Hello World!'
aString = aString[:3] + aString[4:]
print(aString)
print(aString.upper())
print(aString.lower())
print(string.ascii_uppercase)
print(string.ascii_lowercase)
print(string.ascii_letters)
print(string.digits)
